package com.accounting.client.remote.enumeration;

import java.util.List;

import corelib.client.CollectionUtil;

public class CostStatus {
	
	public final static int NotProcessed = 0;
	public final static int CheckedOut   = 1;
	
	public final static CostStatus Not_Processed = new CostStatus(NotProcessed,"未处理");
    public final static CostStatus CHECKED_OUT   = new CostStatus(CheckedOut,  "已结算");

    public final static List<CostStatus> All = CollectionUtil.newArrayList(Not_Processed, CHECKED_OUT);

    public int Status;
    public String Name;

    public CostStatus(int status, String name) {
        Status = status;
        Name   = name;
    }

	public int getStatus() {
		return Status;
	}

	public void setStatus(int status) {
		Status = status;
	}

	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}
    
    public static CostStatus getByStatus(int status){
    	if (status == NotProcessed){
    		return Not_Processed;
    	}
    	if (status == CheckedOut){
    		return CHECKED_OUT;
    	}
    	return null;
    }
}
